<template>
	<view>
		<view class="detail">
			<view class="title center bold f32">
				{{dataObj.title}}
			</view>
			<view class="desc">
				<jyf-parser :html="dataObj.content" ref="article"></jyf-parser>
			</view>
			<view class="info flex-dc-ae f24 c666">
				<text>{{dataObj.createBy}}</text>
				<text class="time">{{dataObj.createTime}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dataObj: {}
			}
		},
		onLoad(options) {
			this.did = options.id
			this.getDetail()
		},
		methods: {
			getDetail(id) {
				this.$http.get('/api/news/info', {
					id:this.did
				}).then(res => {
					let result = res.data
					console.log('', result)
					this.dataObj = result
				})
			}
		}
	}
</script>

<style lang="less">
	page {
		background: #fff;
	}

	.detail {
		padding: 57rpx 67rpx 50rpx 67rpx;

		.title {
			padding: 0 60rpx;
			line-height: 45rpx;
		}

		.desc {
			margin: 35rpx 0;
		}

		.time {
			margin-top: 15rpx;
		}
	}
</style>